package org.aristotle.generator.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.codec.ServerCodecConfigurer;

import java.util.List;

@Data
@Configuration
@ConfigurationProperties(prefix = "aristotle.generator.templates")
public class AriTemplatesConfig {

    private String path;

    private PathConfig pathConfig;

    @Data
    public static class PathConfig {
        private ServerCode serverCode;
        private ClientCode clientCode;
    }

    @Data
    public static class ServerCode {
        private List<TemplatePathItem> generalCode;
        private List<TemplatePathItem> modelCode;
    }

    @Data
    public static class ClientCode {
        private List<TemplatePathItem> generalCode;
        private List<TemplatePathItem> dictCode;
        private List<TemplatePathItem> modelCode;
        private List<TemplatePathItem> toOneCode;
        private List<TemplatePathItem> toRelationCode;
    }

    @Data
    public static class TemplatePathItem {
        private String name;
        private String template;
        private String root;
        private String path;
        private String type;
        private String suffix;
    }



}
